//引用Vuex
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

//实例store对象
const store = new Vuex.Store({
	state: {
		searchResult: []
	},
	mutations: {
		setSearch(state,arr){
			console.log(arr)
			state.searchResult=arr;
		}
	},
    getters:{
		getResult(state){
			return state.searchResult;
		}
	}
})

//导出store对象
export default store
